1. Field of the Invention
Apparatuses and methods consistent with the present invention relate to managing resources in a containment framework environment, more specifically, to managing the allocation and de-allocation of resources in a containment framework environment including a plurality of applications having life cycles.
2. Description of the Related Art
Java is an object-oriented programming language that platform-independently executes a source code. Here, a platform means a software environment, such as hardware or an operating system, on which programs are executed. Java source code is compiled into Java byte code by a Java compiler and the Java byte code is executed by Java virtual machines that have been formatted on various hardware-based platforms.
FIG. 1 is a block diagram showing the architecture of a containment framework according to the related art. A containment framework 10 includes an application manager 11, applications 12a, 12b, and 12c, middleware 13, a Java virtual machine 14, and an operating system 15.
Here, the applications 12a and 12b are Java applications, and the application 12c is a native application.
The application manager 11 manages life cycles of the applications by changing the states of the applications. For example, the application manager 11 manages the operation of the applications through the middleware 13, such as open cable application platform (OCAP) or advanced open cable application platform (ACAP).
The Java virtual machine 14 has classes included in the applications stored in a memory, converts an execution code of the class into a command code of the operating system 15, and manages the resources allocated to the applications.
For resource management, the Java virtual machine 14 has a garbage collector. The garbage collector finds out garbage objects (objects that do not use resources), and returns the used heap resources to the operating system such that the heap resources can be reused by other applications.
That is, resource management on a Java platform is performed by the garbage collector, which manages the allocation or de-allocation of resource to an object depending on whether to refer to the object. However, when a plurality of applications are executed on a framework with a life cycle, such as a containment framework, unless work for resource de-allocation is satisfactorily performed, even after the applications are shut down, the garbage collector does not check whether the object is alive, and thus, resource de-allocation may not be appropriately performed.
For this reason, many researches on resource de-allocation by the garbage collector have been conducted. Most research propose a resource managing method based on a specific framework, but do not propose a resource managing method executed on a general containment framework when an application is shut down.
U.S. Pat. No. 6,738,875 discloses a Write-Watch mechanism that is used for garbage collection and has a memory manager. When an API call, such as garbage collection, occurs, the memory manager checks which virtual address has been modified, and manages a memory separately from garbage collection.
However, U.S. Pat. No. 6,738,875 discloses only a method of de-allocating resources on a general framework, such as a memory resource, but does not disclose a method of de-allocating resources on a containment framework having a life cycle.
Therefore, a method of effectively de-allocating resources of an application that is shut down in a containment framework environment in which a plurality of applications having life cycles can operate is needed.